<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%--个人主页 --%>
<jsp:include page="top.jsp"></jsp:include>
<div class="main">
	<div class="left-1">
		<img src="user/showPicture?id=${user.id}"><br>
		<span>${sign.signContent }</span>
		<div class="gz-fs">
			<a href="user/notifications/attention" style="font-weight: bold;">${attentionTotal }</a>
			<span >关注</span>
			<a href="user/notifications/attentionMe"  style="font-weight: bold;">${attentionMeTotal}</a>
			<span >粉丝</span>    
		</div>
	</div>
	<div class="left-2">
			<div class="left-2-1">
			<span>${user.chName}</span><br>
			<ul>
				<li>
						<c:if test="${user.sex == 0}">保密</c:if>
						<c:if test="${user.sex == 1}">男</c:if>
						<c:if test="${user.sex == 2}">女</c:if>
				</li>
				<li>${user.mobile}</li>
				<li>注册于 <fmt:formatDate value="${user.createDate}" type="both" pattern="yyyy-MM-dd" /></li>
				<li>职业  ${user.job}</li>
			</ul>
			</div>
			<div class="left-2-2">
				<span>${user.integral}<img style="margin-left: 10px;" src="images/jifen.png"></span>
				<span onclick="javascript:alert('该功能暂未开放!');" style="color: #fff;font-size:13px;height:  30px;width: 80px;border: 1px solid #EC876E;text-align: center;line-height: 30px;background: #F89406;margin-left: 8px;border-radius:4px; ">
					获取积分
				</span>
				<span  style="color: #fff;height:  30px;width: 50px;font-size:14px;text-align: center;line-height: 30px;
						<c:if test="${user.grade <5}">border: 1px solid #999999;background:#999999</c:if>
		              	<c:if test="${user.grade >=5 && user.grade <10}">border: 1px solid #468847;background:#468847</c:if>
		               	<c:if test="${user.grade >=10 && user.grade <15}">border: 1px solid #F89406;background:#F89406</c:if>
		               	<c:if test="${user.grade >=15 && user.grade <25}">border: 1px solid #FF0000;background:#FF0000</c:if>
		               	<c:if test="${user.grade >=25}">background:#189AE5</c:if>;
						margin-left: 8px;border-radius:4px;">
					LV${user.grade}
				</span>
			</div>
	</div>
	<div class="left-3">
			<div  class="left-3-1">
					<ul>
							<li>资料完善度   <span>60%</span></li>
							<li>个人头像 :
								<a href="javascript:void(0);" id="upload-person-img">设置</a>
							</li>
							<li>基本资料 :
								<a href="user/account/personData">设置</a>
							</li>
					</ul>
			</div>
			<div class="left-3-2">
					<button type="button" class="btn btn-success"  data-toggle="button" onclick="window.location.href='<%=basePath%>user/moments/momentsList'">发表心情</button>
					<c:if test="${empty signIn }">
						<button type="button" class="btn btn-success"  data-toggle="button" id="sign" onclick="javascript:userHandler.signIntegral();" ondblclick="javascript:void(0);">签到赚积分</button>
					</c:if>
					<c:if test="${!empty signIn }">
						<button type="button" class="btn btn-success" disabled="disabled"  data-toggle="button">今天已签到+1分</button>
					</c:if>
					
			</div>
	</div>
</div>

<!-- 上传图像 -->
	<form action="user/uploadPicture" method="post" enctype="multipart/form-data" id="image-submit">
		<div id="person-img-div" class="person-img-div" >
			<div class="person-img-title">
					<span style="float: left;margin-top: -6px;">图像上传</span>
					<a style="float: right;margin-top: 5px;" href="javascript:void(0);" id="person-img-close" >
					<img  src="images/close.png" style="width: 14px;height: 14px;margin-right: 3px;"></a>
			</div>
			<div class="person-img-content-div">
			</div>
			<div >
				<a href="javascript:;" class="a-upload" style="color: red;">
						<input type="file" name="picture" id="picture" multiple="multiple" />点击这里上传文件
				</a>
			</div>
				<button class="person-img-up-btn" onclick="javascript:save();return false;">
						<span class="person-img-up-span">确定</span>
				</button>
		</div>
		<div id="person-img-bg" class="person-img-bg" ></div>
	</form>
	
<jsp:include page="pay.jsp"></jsp:include>

